package com.odianyun.hello.web.controller;


import com.odianyun.hello.model.VO.UUser;
import com.odianyun.hello.service.IUUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Api(tags = "用户管理")
@RequestMapping("uuser")
public class UUserController {
    @Resource
    private IUUserService uuserService;


    @ApiOperation("通过id查询")
    @PostMapping("findById")
    public List<UUser> findById(Long id){
        List<UUser> list = uuserService.findById(id);
        return list;
    }

    @ApiOperation("批量更新")
    @PostMapping("updateBatch")
    public void updateBatch(Long id,String password){
        uuserService.updateBatch(id,password);
    }

}
